package collection;

public class SNode<T> extends ANode<T>{
	
	private SNode<T> next;

	SNode()
	{
		this(null, null);
	}
	
	SNode(T element)
	{
		this(element, null);
	}
	
	private SNode(T element, SNode<T> next)
	{
		super(element);
		this.next = next;
	}
	
	SNode(SNode<T> newNode)
	{
		this(newNode.element, newNode.next);
	}
	
	SNode<T> getNext()
	{
		return this.next;
	}
	
	void setNext(SNode<T> next)
	{
		this.next = next;
	}

	@Override
	public void clear()
	{
		super.clear();
		this.next = null;
	}
	
}
